use 5 * gtk-timeout-repeat, just as many other widgets. Makes the calendar
authorMichael Natterer <mitch@imendio.com>
Mon, 17 Jul 2006 12:55:12 +0000 (12:55 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Mon, 17 Jul 2006 12:55:12 +0000 (12:55 +0000)
2006-07-17  Michael Natterer  <mitch@imendio.com>

* gtk/gtkcalendar.c (calendar_timer): use 5 * gtk-timeout-repeat,
just as many other widgets. Makes the calendar arrow buttons
usable for quick month/year skipping (#142582).

ChangeLog
ChangeLog.pre-2-10
gtk/gtkcalendar.c

index ce58b379d0366f2fab5647fd06b7efdfdb4ac5de..755fcd3dcfd641a91392230fb427db23878da26e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-17  Michael Natterer  <mitch@imendio.com>
+
+       * gtk/gtkcalendar.c (calendar_timer): use 5 * gtk-timeout-repeat,
+       just as many other widgets. Makes the calendar arrow buttons
+       usable for quick month/year skipping (#142582).
+
 2006-07-17  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkwindow-quartz.c:
index ce58b379d0366f2fab5647fd06b7efdfdb4ac5de..755fcd3dcfd641a91392230fb427db23878da26e 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-17  Michael Natterer  <mitch@imendio.com>
+
+       * gtk/gtkcalendar.c (calendar_timer): use 5 * gtk-timeout-repeat,
+       just as many other widgets. Makes the calendar arrow buttons
+       usable for quick month/year skipping (#142582).
+
 2006-07-17  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkwindow-quartz.c:
index 23c593006cfc81600524e3f25c3493f4c3c052f9..01fe262b0f61c9834fefdd09694572431fffd8a0 100644 (file)
@@ -186,6 +186,8 @@ dates_difference(guint year1, guint mm1, guint dd1,
 #define DAY_XSEP                0 /* not really good for small calendar */
 #define DAY_YSEP                0 /* not really good for small calendar */
 
+#define SCROLL_DELAY_FACTOR      5
+
 /* Color usage */
 #define HEADER_FG_COLOR(widget)                 (& (widget)->style->fg[GTK_WIDGET_STATE (widget)])
 #define HEADER_BG_COLOR(widget)                 (& (widget)->style->bg[GTK_WIDGET_STATE (widget)])
@@ -2398,7 +2400,7 @@ calendar_timer (gpointer data)
           g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
 
          priv->need_timer = FALSE;
-         priv->timer = g_timeout_add (timeout,
+         priv->timer = g_timeout_add (timeout * SCROLL_DELAY_FACTOR,
                                        (GSourceFunc) calendar_timer,
                                        (gpointer) calendar);
        }